<?php
require('../smarty/smarty_config.php');
require('../config/DB.php');

$mysql_class = new DB();
$mysql_class ->conn_mysql();

$get_posts = 'select * from post';
$get_posts_res = $mysql_class ->  run_sql_query($get_posts);

while ($post_info  = mysql_fetch_array($get_posts_res)) {
	$post_list[] = $post_info;	
}

$smarty -> assign('posts',$post_list);
$smarty -> display('./post/post.tpl');
?>